package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.H5CourseMapper;
import com.jsb.model.H5Course;
import com.jsb.model.H5CourseExample;

@Service
public class H5CourseService{
	
	@Resource
	private H5CourseMapper h5CourseMapper;
	
	public void addH5Course(H5Course h5Course) {
		h5CourseMapper.insertSelective(h5Course);
	}
	
	public void delH5CourseById(String id) {
		h5CourseMapper.deleteByPrimaryKey(id);
	}
	
	public void updateH5Course(H5Course h5Course) {
		h5CourseMapper.updateByPrimaryKeySelective(h5Course);
	}
	
	public void updateH5CourseByExample(H5Course h5Course,H5CourseExample h5CourseExample){
	    h5CourseMapper.updateByExampleSelective(h5Course,h5CourseExample);
	}
	
	public H5Course getH5CourseById(String id) {
		return h5CourseMapper.selectByPrimaryKey(id);
	}
	
	public List<H5Course> getPageH5Course(H5CourseExample h5CourseExample) {
		return h5CourseMapper.selectPage(h5CourseExample);
	}
	
	public int countH5Course(H5CourseExample h5CourseExample) {
		return h5CourseMapper.countByExample(h5CourseExample);
	}
	
	public List<H5Course> selectByExample(H5CourseExample example){
	    return h5CourseMapper.selectByExample(example);
	}
}
